package com.liuzh.deviceinfo.card;

import android.content.Context;
import android.os.Build;
import android.os.Build.VERSION;
import android.util.AttributeSet;
import android.widget.FrameLayout;
import android.widget.TextView;
import androidx.cardview.widget.CardView;
import c.h.a.m0.h;
import c.h.a.m0.k;
import c.h.a.z.s;
import java.text.SimpleDateFormat;
import java.util.Locale;

public class SystemInfoCard extends CardView {
    public SystemInfoCard(Context context, AttributeSet attributeSet) {
        CharSequence format;
        super(context, attributeSet);
        setUseCompatPadding(true);
        FrameLayout.inflate(getContext(), 2131492936, this);
        int i = VERSION.SDK_INT;
        if (isInEditMode()) {
            ((TextView) findViewById(2131297329)).setText(getResources().getStringArray(2130903041)[i]);
        } else {
            ((TextView) findViewById(2131297329)).setText(h.c(i));
        }
        ((TextView) findViewById(2131296354)).setText(String.valueOf(i));
        ((TextView) findViewById(2131296411)).setText(String.valueOf(Build.DISPLAY));
        try {
            format = new SimpleDateFormat("dd MMM yyyy HH:mm:ss z", Locale.getDefault()).format(Long.valueOf(Build.TIME));
        } catch (Exception unused) {
            format = getResources().getString(2131690514);
        }
        ((TextView) findViewById(2131296412)).setText(format);
        ((TextView) findViewById(2131296410)).setText(Build.ID);
        if (i >= 23) {
            ((TextView) findViewById(2131296878)).setText(VERSION.SECURITY_PATCH);
        } else {
            findViewById(2131296879).setVisibility(8);
        }
        String str = Build.BOOTLOADER;
        if ("unknown".equalsIgnoreCase(str)) {
            findViewById(2131296396).setVisibility(8);
        } else {
            ((TextView) findViewById(2131296395)).setText(str);
        }
        ((TextView) findViewById(2131296385)).setText(Build.getRadioVersion());
        ((TextView) findViewById(2131296670)).setText(Locale.getDefault().getDisplayName());
        ((TextView) findViewById(2131296844)).setText(k.O() ? 2131690575 : 2131690129);
        post(new s(this, (TextView) findViewById(2131297013)));
        ((TextView) findViewById(2131297053)).setText(k.M());
    }
}
